<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        .a{
            width: 100px;height: 50px;
            background-color: green;
            float: left;
        }
        .b{
            width: 200px;height: 100px;
            background-color: gray;
        }
        .aa{
            width: 100px;
            background-color: gray;
        }
        .bb{
            width: 200px;
            background-color: greenyellow;
        }
        .cc{
            width: 300px;
            background-color: hotpink;
        }
        .aa,.bb,.cc{
            height: 100px;
            float: left;
        }
        .z{
            width: 100%;
            height: 300px;
            background-color: khaki;
        }
        .out{
            overflow: auto;
        }
        .ul{
            padding: 0%;
            width: 100px;
            height: 200px;
            border: solid;
            border-width: 1px;
            border-color: black;
            background-color: blanchedalmond;
        }
        li{
            clear: both;
            list-style-type: none;
        }
        .x{
            float: left;
        }
        .y{
            float: right;
        }
    </style>
    <title>元素的浮动布局</title>
</head>
<body>
    <div class="a"></div>
    <div class="b">你是猪吗你是猪吗你是猪吗你是猪吗你是猪吗你是猪吗你是猪吗</div>
    <p>横向元素浮动</p>
    <div class="out">
        <div class="aa"></div>
        <div class="bb"></div>
        <div class="cc"></div>
    </div>
    <div class="z"></div>
    <ul class="ul">
        <li class="x">zch </li>
        <li class="y">zmj </li>
        <li class="x">zch </li>
        <li class="y">zmj </li>
        <li class="x">zch </li>
        <li class="y">zmj </li>
    </ul>
</body>
</html>